<?php
/**
* @version $Id: install.xfaq.php,v 1.0 2005/10/02 13:15:15 mic Exp $
* @package XFaq - Addon 4 Jommla & Mambo OS CMS
* @copyright (C) 2005 mgfi.info
* @info: www.parkviewconsultants.com
* @edited info@mgfi.info http://www.mgfi.info
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html.
*/

function com_install() {
    global $database;

     // call for correct language
	$pathLanguagesAdmin = $GLOBALS['mosConfig_absolute_path'] . '/administrator/components/com_xfaq/languages/admin_';
    $tmp_lng = $GLOBALS['mosConfig_lang'];
    if( $GLOBALS['mosConfig_alang'] ){
        if ( file_exists( $pathLanguagesAdmin . $GLOBALS['mosConfig_alang'] . '.php' )) $tmp_lng = $GLOBALS['mosConfig_alang'];
    }
    if( file_exists( $pathLanguagesAdmin . $tmp_lng . '.php' )){
        include_once( $pathLanguagesAdmin . $tmp_lng . '.php' );
    }else{
        include_once( $pathLanguagesAdmin . 'german.php' );
    }

    # Set up new icons for admin menu
    $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/edit.png' WHERE admin_menu_link='option=com_xfaq&task=view'");
    $iconresult[0] = $database->query();
    $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/config.png' WHERE admin_menu_link='option=com_xfaq&task=config'");
    $iconresult[1] = $database->query();
    $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/user.png' WHERE admin_menu_link='option=com_xfaq&task=language'");
    $iconresult[2] = $database->query();
    $database->setQuery("UPDATE #__components SET admin_menu_img='js/ThemeOffice/credits.png' WHERE admin_menu_link='option=com_xfaq&task=about'");
    $iconresult[3] = $database->query();

    # Show installation result to user
    ?>
    <div align="left" id="install">
        <p style="font-weight:bold;"><?php echo _XFAQ_INSTALL_HEAD; ?></p>
        <p><?php echo _XFAQ_INSTALL1; ?></p>
        <p><code><?php echo _XFAQ_INSTALL2; ?></code></p>
    </div>
    <?php
}
?>